public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}
class Solution {
    public void moveZeroes(int[] nums) {
        int dest = -1;
        int cur = 0;
        while(cur<nums.length) {
            while(cur<nums.length && nums[cur]!=0) {
                swap(nums,dest+1,cur);
                dest++;
                cur++;
            }
            cur++;
        }
    }

    private void swap(int[] nums,int x,int y) {
        int tamp = nums[x];
        nums[x] = nums[y];
        nums[y] = tamp;
    }
}